package Jumin_Test;

public class JuminVO {
	private String name;
	private String juminNo;
	private String birthday;
	private String gender;
	private String country;
	private String area;
	private String age;
	
	public JuminVO() {
		name = null;
		juminNo = null;
	}
	public JuminVO(String name, String juminNo) {
		this.name = name;
		this.juminNo = juminNo;
	}
	
	public void setName(String name) { this.name = name; }
	public void setJuminNo(String juminNo) { this.juminNo = juminNo; }
	public void setBirthday(String birthday) { this.birthday = birthday; }
	public void setGender(String gender) { this.gender = gender; }
	public void setCountry(String country) { this.country = country; }
	public void setArea(String area) { this.area = area; }
	public void setAge(String age) { this.age = age; }
	public String getName() { return name; }
	public String getJuminNo() { return juminNo; }
	public String getBirthday() { return birthday; }
	public String getGender() { return gender; }
	public String getCountry() { return country; }
	public String getArea() { return area; }
	public String getAge() { return age; }
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("입력하신 ").append(getName()).append(" 님의 주민등록 번호 분석 결과입니다.")
		.append("\n○ 입력된 주민등록 번호 : ").append(getJuminNo().substring(0, 6)).append(" - ")
		.append(getJuminNo().substring(6, 13))	.append("\n○ 생년 월일 : ").append(getBirthday())
		.append("\n○ 성별 : ").append(getGender()).append("\n○ 내/외국인 구분 : ").append(getCountry())
		.append("\n○ 출생 지역 : ").append(getArea())
		.append("\n○ 현재 나이 : ").append(getAge());
		return sb.toString();
	}
}
